//
//  WCProjectFileDetailArrayController.m
//  WabbitCode
//
//  Created by William Towe on 1/31/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import "WCProjectFileDetailArrayController.h"
#import "WCProjectOutlineView.h"
#import "NSTreeController+WCExtensions.h"
#import "WCProject.h"


@implementation WCProjectFileDetailArrayController
#pragma mark NSTableViewDataSource Protocol
- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)indexes toPasteboard:(NSPasteboard *)pboard {
	NSArray *representedObjects = [[self arrangedObjects] objectsAtIndexes:indexes];
	[pboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType] owner:nil];
	[pboard setData:[NSKeyedArchiver archivedDataWithRootObject:[[[[[tableView window] windowController] document] projectTreeController] indexPathsForRepresentedObjects:representedObjects]] forType:kWCProjectOutlineViewPboardType];
	return YES;
}
@end
